<?php include_once 'brand_header_index.php' ;?>
<script type="text/javascript">
function favorite(uid,recommendid){
	$.ajax({
		url: 'index.php?mod=brandindex&code=nav',
		type: 'GET',
		dataType: 'text',
		cache:false,
		data: 'uid='+uid+'&recommendid='+recommendid,
		success: function(d){
		 if(d=='re'){
				art.dialog({
				title: '提示', 
				content:'请先登录！',
				time: 3000
			})	
		 }else{
		  $('#sc_'+recommendid).html(d);
			art.dialog({
				title: '提示', 
				content:d,
				time: 1000
			})	
		 }
		}	
	})
}
function recommend(uid,id){
	$.ajax({
		url: 'index.php?mod=brandindex&code=nav',
		type: 'GET',
		dataType: 'text',
		cache:false,
		data: 'uid='+uid+'&id='+id,
		success: function(d){
		    if(d=='re'){
				art.dialog({
				title: '提示', 
				content:'请先登录！',
				time: 3000
				});	
			}else{
				$('#tj_'+id).html(d);
				art.dialog({
					title: '提示', 
					content:d,
					time: 1000
				});
			}
		}	
	})
}

</script>
<!--主体内容-->
<div class="brand_nav">
  <div id="brand_nav_left">
  	<div class="title">品牌分类<?php 
			if( _IS_BRAND_ADMIN_ == 2 ){ 
				echo "<span style='float:right;font-size:10px;'><a href='index.php?mod=brandadmin'>设置</a></span>";
			}
		?></div>
  	<div class="nav">
	
		<?php foreach($brandtype_list as  $key=>$vals){ ?>
		<ul><li class="menu" id="b_<?php echo md5($key);?>" style="cursor:default;">+ <?php echo $key;?><?php 
			if( _IS_BRAND_ADMIN_ == 2 && $key==_COM_NAME_ ){
				echo "<span style='float:right;font-size:10px;'><a href='index.php?mod=brandadmin'>设置</a></span>";
			}
		?></li></ul>
    	<ul id="list_b_<?php echo md5($key);?>">
		<?php foreach($vals as $val){?>
		
        <li><a title="<?php echo $val[2] ?>" href="index.php?mod=brandindex&code=nav&serid=<?php echo  $val[0];?>"><?php echo  $val[1];?></a></li>
       <?php }/*end foreach*/ ?>
        </ul>	   
	   <?php }?>
	   
    </div>
  </div>
  <div id="brand_nav_right">
  	<div class="brand_nav_right">
    	<div class="bread"><a href="index.php">首页</a> > <a href="###">品牌导航</a></div>
    	<div class="assort">
    		<dl>
            	<dt>品牌：</dt>
                <dd class="assort_brand_all"><a href="index.php?mod=brandindex&code=nav" class="this">不限</a></dd>
                <dd class="assort_brand"><?php echo $brandseri;?></dd>
				<div class="float_both"></div>
            </dl>
			<div class="float_both"></div>
			
    		<dl class="assort_border">
            	<dt>品类：</dt>
                <dd><?php echo $pinlei_list;?></dd>
            </dl>
            <div class="float_both"></div>
			
    		<dl class="assort_border">
            	<dt>类别：</dt>
                <dd><?php echo $producttype_list;?></dd>
            </dl>
            <div class="float_both"></div>
			
    		<dl class="assort_border" id="morebutton">
			<a href="#" id="brandbottom" onclick="$('#moreinfo').show();$('#morebutton').hide();" style=" margin-left:300px;color:#006699;">↓ 展开 ↓</a>
            </dl>
            <div class="float_both"></div>
			
		  <div id="moreinfo" style="display:none;">
			<dl class="assort_border">
            	<dt>产品规格：</dt>
                <dd><?php echo $standard_list;?></dd>
            </dl>
			 <div class="float_both"></div>
			<dl class="assort_border">
            	<dt>包装规格：</dt>
                <dd><?php echo $standarde_list;?></dd>
            </dl>
			 <div class="float_both"></div>
			 
			<dl class="assort_border">
            	<dt>批发价：</dt>
                <dd><a href="index.php?mod=brandindex&code=nav&w_price=100">0-100元</a><a href="index.php?mod=brandindex&code=nav&w_price=200">100-200元</a>
				<a href="index.php?mod=brandindex&code=nav&w_price=500">200-500元</a><a href="index.php?mod=brandindex&code=nav&w_price=1000">500-1000元</a>
				</dd>
            </dl>
			 <div class="float_both"></div>
			 
			<dl class="assort_border">
            	<dt>零售价：</dt>
                <dd><a href="index.php?mod=brandindex&code=nav&r_price=100">0-100元</a><a href="index.php?mod=brandindex&code=nav&r_price=200">100-200元</a>
				<a href="index.php?mod=brandindex&code=nav&r_price=500">200-500元</a><a href="index.php?mod=brandindex&code=nav&r_price=1000">500-1000元</a>
				</dd>
            </dl>
			 <div class="float_both"></div>
			 
			<dl class="assort_border">
            	<dt>上市时间：</dt>
                <dd><a href="index.php?mod=brandindex&code=nav&markettime=2012">2012年</a><a href="index.php?mod=brandindex&code=nav&markettime=2011">2011年</a>
				<a href="index.php?mod=brandindex&code=nav&markettime=2009">2009年</a><a href="index.php?mod=brandindex&code=nav&markettime=2008">2008年</a>
				</dd>
            </dl>
            <div class="float_both"></div>
			
    		<dl class="assort_border">
            	<dt>焦油量：</dt>
                <dd><?php echo $tar_list;?></dd>
            </dl>
            <div class="float_both"></div>
			
    		<dl class="assort_border" id="morebuttonclose">
			<a href="#" id="brandbottom" onclick="$('#moreinfo').hide();$('#morebutton').show();" style=" margin-left:300px;color:#006699;">↑ 收起 ↑</a>
            </dl>
            <div class="float_both"></div>
			
		  </div>
    	</div>
    	<div class="list_title">
        	<span class="selected"><select name="selected">
        	  <option selected="selected">默认排序</option>
        	  <option>价格从低到高</option>
        	</select></span>
            <span class="selected_q"><a href="index.php?mod=brandindex&code=nav&price=asc">价格↑</a> <a href="index.php?mod=brandindex&code=nav&renqi=desc" class="this">人气↓</a></span>
            <ul class="pagelist">
            <?php echo $page_arr['html'];?>
          </ul>
 		 <div class="float_both"></div>
   	  </div>
	  <?php foreach($navtobacco as $tobaccos){?>
       <div class="list"> 
			<span class="img"><a href="index.php?mod=brandindex&code=detail&ids=<?php echo $tobaccos['id']; ?>"><img src="images/brand/<?php echo $tobaccos['pic'];?>" /></a></span>
			<span class="name"><a href="index.php?mod=brandindex&code=detail&ids=<?php echo $tobaccos['id']; ?>"><?php echo $tobaccos['tobacco_name'];?></a></span>
  		    <span class="present"><?php echo $tobaccos['intro'];?></span>
        	<span class="price">批发价：<i><?php echo $tobaccos['w_price'];?></i>&nbsp;&nbsp;&nbsp;零售指导价：<i><?php echo $tobaccos['r_price'];?></i></span>
			<span class="collect"><a href="javascript:void(0);" onclick="favorite('<?php echo $_COOKIE['MEMBER_ID']; ?>','<?php echo $tobaccos['id']; ?>')" id="sc_<?php echo $tobaccos['id']; ?>">收藏</a> <a href="javascript:void(0);" onclick="recommend('<?php echo $_COOKIE['MEMBER_ID']; ?>','<?php echo $tobaccos['id']; ?>')" id="tj_<?php echo $tobaccos['id']; ?>">推荐</a> </span>
           
        </div>
		<?php }?>
    	<div class="float_both"></div>
        <ul class="pagelist mt12">
           <?php echo $page_arr['html'];?>
		</ul>
  		<div class="float_both"></div>
	</div>
  </div>
  <div class="float_both"></div>
</div>
<script type="text/javascript">
$(function(){
	$("ul[id^='list_b_']").hide();
	$("li.menu[id^='b_']").first().css({'color':'#006699','fontWeight':'bold'});
	$("ul[id^='list_b_']").first().show();
	$("li.menu").click(function(){
		$("li.menu[id^='b_']").css({'color':'#444444','fontWeight':'normal'});
		$(this).css({'color':'#006699','fontWeight':'bold'});
		$("ul[id^='list_b_']").hide();
		$("#list_"+$(this).attr('id')).slideToggle();
	});
});
</script>
<!--底部-->
<?php include_once 'brand_footer.php' ;?>
